﻿@model Entidades.ENContrato
@using EncomiendaMVC.Helpers

@{
    ViewBag.Title = "Create";
    //Layout = null;
}

<!-- JQUERY UI -->
<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.24.min.js")"></script>
@*<link href="http://code.jquery.com/ui/1.8.2/themes/flick/jquery-ui.min.css" rel="stylesheet" />*@
@*<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />*@
@*<script src='http://code.jquery.com/jquery-1.8.2.min.js'></script>
<script src='http://code.jquery.com/ui/1.8.2/jquery-ui.min.js'></script>*@

@*<script src="@Url.Content("~/Scripts/modernizr-2.5.3.js")"></script>*@
<script src="@Url.Content("~/Scripts/base/modHtml5.js")"></script>

@*<script src="@Url.Content("~/Content/bootstrap/js/bootstrap.js")"></script>*@
@*<script src="@Url.Content("~/Content/bootstrap/js/jquery-1.9.1.min.js")"></script>*@
<link href="@Url.Content("~/Content/fancy/jquery.fancybox.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery.fancybox.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/base/modModal.js")"></script>

<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
<!-- Bootstrap JS: compiled and minified -->
@*<script src="~/Content/bootstrap/js/bootstrap.min.js"></script>*@
@*<script src="@Url.Content("~/Content/bootstrap/js/jquery.js")"></script>*@
@*<script src="@Url.Content("~/Content/bootstrap/js/tab.js")"></script>*@

<!-- jQuery via Google + local fallback, see h5bp.com -->
@*	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  	<script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>*@
@*<br><a class="btn btn-primary" href="#" id="btnReview">Siguiente</a><br>
<ul class="nav nav-tabs">
    <li class="active">
    <a href="#tab1" data-toggle="tab">Shipping</a></li>
    <li><a href="#tab2" data-toggle="tab">Quantities</a></li>
    <li><a href="#tab3" data-toggle="tab">Summary</a></li>
</ul>
<div class="tab-content">
	<div class="tab-pane active" id="tab1">Home content...</div>
	<div class="tab-pane" id="tab2">Content here.</div>
    <div class="tab-pane" id="tab3">Content here...</div>
</div>*@

@Html.Titulo("Registrar Contrato") 

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        @*<div class="page-header">*@
            @*<h2>Registrar Contrato</h2>*@
            @*@Html.Header("Registrar Contrato")*@
        @*</div>*@

        <table>
                    <tr>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Cliente_ID)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.TextBox("Cliente_ID", (String)@ViewBag.DatoCliente, new { type="autofocus required", @readonly = "readonly" })
                                @Html.ValidationMessageFor(model => model.Cliente_ID)
                                @*@Html.ActionLink("..",  "Index",  "Cliente" ,(String)@ViewBag.DatoCliente, new { @class="btn btn-info modalVista" })*@
                                @*  @Html.ActionLink("..", "Index", "Contrato", new { id= 1 }, new { @class = "btn btn-info modalVista" })*@
                                @Html.ActionLink("..", "Index", "Cliente", null, new { @class = "btn btn-info modalVista" })
                               
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Ruta)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.Ruta, (SelectList)ViewBag.Ruta, ":::Seleccione:::")
                                @Html.ValidationMessageFor(model => model.Ruta)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Aerolinea)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.Aerolinea, (SelectList)ViewBag.Aerolinea, ":::Seleccione:::")
                                @Html.ValidationMessageFor(model => model.Aerolinea)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.FechaSalida)
                        </th>
                        <td>
                            <div class="editor-field">
                                  @*<input type="date" id="fecha" value="" class="datepicker" style="width: 150px;" />*@
                             @*   @Html.TextBoxFor(model => model.FechaSalida, new { @type = "date", @class = "fecha" })
                                @Html.ValidationMessageFor(model => model.FechaSalida)*@
                                @Html.TextBox("FechaSalida",null, new { type = "date", @class="fecha",placeholder = "Ingresa una Fecha" })
                                @Html.ValidationMessageFor(model => model.FechaSalida)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.FechaLlegada)
                        </th>
                        <td>
                            <div class="editor-field">
                               @* @Html.TextBoxFor(model => model.FechaLlegada, new { @type = "date" })
                                @Html.ValidationMessageFor(model => model.FechaLlegada)*@
                                   @Html.TextBox("FechaLlegada",null, new { type = "date", @class="fecha",placeholder = "Ingresa una Fecha" })
                                   @Html.ValidationMessageFor(model => model.FechaLlegada)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Vuelo)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Vuelo, new { placeholder = "Ingresa un Nº Vuelo" })
                                @Html.ValidationMessageFor(model => model.Vuelo)
                            </div>
                        </td>                        
                    </tr>

             @*   </table>*@

     @*           <br>
                <a class="btn btn-primary" href="#" id="btnReview">Siguiente</a><br>
            </div>
            <div class="tab-pane" id="profile">
                <table>*@
                    <tr>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.NumeroMaletas )
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.NumeroMaletas, new {placeholder = "Ingresa un Numero de Maletas"})
                                @Html.ValidationMessageFor(model => model.NumeroMaletas)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Precio)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Precio, new {placeholder = "Ingresa un Precio"})
                                @Html.ValidationMessageFor(model => model.Precio)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.TipoEntrega)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.TipoEntrega, (SelectList)ViewBag.TipoEntrega, ":::Seleccione:::")
                                @Html.ValidationMessageFor(model => model.TipoEntrega)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Total_cnt)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Total_cnt)
                                @Html.ValidationMessageFor(model => model.Total_cnt)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Peso)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.Peso, new {placeholder = "Ingresa un Peso"})
                                @Html.ValidationMessageFor(model => model.Peso)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.DatosMaleta)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.DatosMaleta, (SelectList)ViewBag.DatoMaletas, ":::Seleccione:::")
                                @Html.ValidationMessageFor(model => model.DatosMaleta)
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Descripcion)
                        </th>
                        <td>
                            <div class="editor-field">
                                @Html.TextAreaFor(model => model.Descripcion, new {placeholder = "Ingresa una Descripcion de las Maletas"})
                                @Html.ValidationMessageFor(model => model.Descripcion)
                            </div>
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Gastos)
                        </th>
                        <td class="editor-field">
                            @Html.TextAreaFor(model => model.Gastos, new {placeholder = "Ingresa los Gastos por las Maletas"})
                            @Html.ValidationMessageFor(model => model.Gastos)
                        </td>
                        <th class="editor-label">
                            @Html.LabelFor(model => model.Observacion)
                        </th>
                        <td class="editor-field">
                            @Html.TextAreaFor(model => model.Observacion, new {placeholder = "Ingresa alguna Observacion"})
                            @Html.ValidationMessageFor(model => model.Observacion)
                        </td>
                        <td>
                            <br />
                            <br />
                          
                            @*  <br><a class="btn btn-primary" href="#" id="btnReview1">Siguiente</a><br>*@</td>
                        @* <div class="editor-label">
            @Html.LabelFor(model => model.Estado)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Estado)
            @Html.ValidationMessageFor(model => model.Estado)
        </div>*@
                    </tr>
            <tr>               
                <th class="editor-label">
                    @Html.LabelFor(model => model.Cod_Estado)
                </th>
                <td>
                    <div class="editor-field">
                        @Html.DropDownListFor(model => model.Cod_Estado, (SelectList)ViewBag.Estado, ":::Seleccione:::")
                        @Html.ValidationMessageFor(model => model.Cod_Estado)
                    </div>
                </td>               
            </tr>
                </table>

        
              <p>
                                <input type="submit" id="btnGuardar" value="Guardar" class="btn btn-inverse" />
                            </p>
       


    </fieldset>
}
@*<script>
    $('#btnReview').click(function () {
        $('.nav-tabs > .active').next('li').find('a').trigger('click');
    });
    $('#btnReview1').click(function () {
        $('.nav-tabs > .active').next('li').find('a').trigger('click');
    });
</script>*@

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
@*@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}*@